'use strict'

// 文章是否点赞收藏
class getPassageState{

    async get (c) {       
        let id = c.param.id;
        let openid = c.box.user.openid;
        let likeData = await c.service.model.db_wx_Like.getPassageLikeState(id,openid);
        let collectionData = await c.service.model.db_wx_Collect.getPassageCollectState(id,openid);
        let data = JSON.stringify({
            like:likeData,
            collect:collectionData
        })
        c.send(data,200)
    }
}

module.exports = getPassageState